<?php
if($order->info['payment_method'] != 'no_payment' && !empty($order->info['payment_method'])) {
	include(DIR_FS_LANGUAGES.$_SESSION['language'].'/modules/payment/'.$order->info['payment_method'].'.php');
	echo constant(strtoupper('MODULE_PAYMENT_'.$order->info['payment_method'].'_TEXT_TITLE'));
} else
	echo '<em>keine Zahlart genutzt</em>';
?><br />
<?php
if($order->info['payment_method'] == 'pi_clickandbuy' OR $order->info['payment_method'] == 'pi_clickandbuy_recurring') {
	echo '<a class="button cab_button" href="pi_clickandbuy_details.php?oID='.$_GET['oID'].'">Click&amp;Buy Aktionen</a>';		
}
 // Start Sofortüberweisung
if (MODULE_PAYMENT_SOFORTUEBERWEISUNG_DIRECT_STATUS == 'True' ) {
  	$sofortueberweisung_check = $db->db_query("SELECT sofortueberweisung_transaktions_details FROM ".TABLE_ORDERS." WHERE orders_id = ".$db->db_prepare($_GET['oID']));
  	if ($sofortueberweisung_check->_numOfRows > 0) {
		if (!empty($sofortueberweisung_check->fields['sofortueberweisung_transaktions_details'])) {
	  		$hidden_trigger_post_vars = unserialize($sofortueberweisung_check->fields['sofortueberweisung_transaktions_details']);
?>
  <tr>
	<td valign="top"><table border="0" cellspacing="0" cellpadding="2">
	  <tr>
		<td><table width="100%" border="0" cellspacing="0" cellpadding="2">
		  <tr>
			<td valign="top">TranscactionID:</td>
			<td valign="top"><?php echo (!empty($hidden_trigger_post_vars['post']['transaction']) ? $hidden_trigger_post_vars['post']['transaction'] : $hidden_trigger_post_vars['get']['transaction']); ?></td>
		  </tr>
		  <tr>
			<td valign="top">Betrag:</td>
			<td valign="top"><?php echo (!empty($hidden_trigger_post_vars['post']['amount']) ? $hidden_trigger_post_vars['post']['amount'].' '.$hidden_trigger_post_vars['post']['currency_id'] : $hidden_trigger_post_vars['get']['amount'].' '.$hidden_trigger_post_vars['get']['currency_id']); ?></td>
		  </tr>
		  <tr>
			<td valign="top">Verwendungszweck 1:</td>
			<td valign="top"><?php echo $hidden_trigger_post_vars['post']['reason_1'] ; ?></td>
		  </tr>
		  <tr>
			<td valign="top">Verwendungszweck 2:</td>
			<td valign="top"><?php echo $hidden_trigger_post_vars['post']['reason_2'] ; ?></td>
		  </tr>
		  <tr>
			<td valign="top">Sicherheits-Kriterien erfР“Сllt:</td>
			<td valign="top"><?php echo  ($hidden_trigger_post_vars['post']['security_criteria'] == 1 ? 'Ja' : 'Nein') ; ?></td>
		  </tr>
		</table></td>
	  </tr>
		  <tr>
			<td><table border="0" cellspacing="0" cellpadding="2">
			  <tr>
				<td colspan="2" valign="top"><b>Absender der &Uuml;berweisung:</b></td>
			  </tr>
			  <tr>
				<td valign="top">Inhaber:</td>
				<td><?php echo $hidden_trigger_post_vars['post']['sender_holder'] ; ?></td>
			  </tr>
			  <tr>
				<td valign="top">Konto:</td>
				<td><?php echo $hidden_trigger_post_vars['post']['sender_account_number'] ; ?></td>
			  </tr>
			  <tr>
				<td valign="top">BLZ:</td>
				<td><?php echo $hidden_trigger_post_vars['post']['sender_bank_code'] ; ?></td>
			  </tr>
			  <tr>
				<td valign="top">Bank:</td>
				<td><?php echo $hidden_trigger_post_vars['post']['sender_bank_name'] ; ?></td>
			  </tr>
			  <tr>
				<td valign="top">BIC:</td>
				<td><?php echo $hidden_trigger_post_vars['post']['sender_bank_bic'] ; ?></td>
			  </tr>
			  <tr>
				<td valign="top">IBAN:</td>
				<td><?php echo $hidden_trigger_post_vars['post']['sender_iban'] ; ?></td>
			  </tr>
			  <tr>
				<td valign="top">Land:</td>
				<td><?php echo $hidden_trigger_post_vars['post']['sender_country_id'] ; ?></td>
			  </tr>
			</table></td>
			<td>&nbsp;&nbsp;&nbsp;</td>
			<td><table border="0" cellspacing="0" cellpadding="2">
				<tr>
				  <td colspan="2" valign="top"><b>Empf&auml;nger der &Uuml;berweisung:</b></td>
				</tr>
				<tr>
				  <td valign="top">Inhaber:</td>
				  <td><?php echo $hidden_trigger_post_vars['post']['recipient_holder'] ; ?></td>
				</tr>
				<tr>
				  <td valign="top">Konto:</td>
				  <td><?php echo $hidden_trigger_post_vars['post']['recipient_account_number'] ; ?></td>
				</tr>
				<tr>
				  <td valign="top">BLZ:</td>
				  <td><?php echo $hidden_trigger_post_vars['post']['recipient_bank_code'] ; ?></td>
				</tr>
				<tr>
				  <td valign="top">Bank:</td>
				  <td><?php echo $hidden_trigger_post_vars['post']['recipient_bank_name'] ; ?></td>
				</tr>
				<tr>
				  <td valign="top">BIC:</td>
				  <td><?php echo $hidden_trigger_post_vars['post']['recipient_bank_bic'] ; ?></td>
				</tr>
				<tr>
				  <td valign="top">IBAN:</td>
				  <td><?php echo $hidden_trigger_post_vars['post']['recipient_iban'] ; ?></td>
				</tr>
				<tr>
				  <td valign="top">Land:</td>
				  <td><?php echo $hidden_trigger_post_vars['post']['recipient_country_id'] ; ?></td>
				</tr>
			</table></td>
		  </tr>

		</table></td>
	  </tr>

<?php
	}
  }
}

// End SofortÜberweisung

// Paypal Express Modul Änderungen:
if ($order->info['payment_method']=='paypal_ipn' or $order->info['payment_method']=='paypal_directpayment' or $order->info['payment_method']=='paypal' or $order->info['payment_method']=='paypalexpress') {
	require('../includes/classes/class.paypal_checkout.php');
	require('includes/classes/class.paypal.php');
	$paypal = new paypal_admin();
	$paypal->admin_notification((int)$_GET['oID']);
}
// Paypal Express Modul Änderungen Ende

// begin modification for banktransfer
$banktransfer = $db->db_query("SELECT 
									banktransfer_prz, 
									banktransfer_status, 
									banktransfer_owner, 
									banktransfer_number, 
									banktransfer_bankname, 
									banktransfer_blz, 
									banktransfer_fax 
								FROM 
									".TABLE_BANKTRANSFER." 
								WHERE 
									orders_id = ".$db->db_prepare($_GET['oID']));
if (($banktransfer->fields['banktransfer_bankname']) || ($banktransfer->fields['banktransfer_blz']) || ($banktransfer->fields['banktransfer_number'])) {
?>
	  <tr>
		<td colspan="2">&nbsp;</td>
	  </tr>
	  <tr>
		<td><?php echo TEXT_BANK_NAME; ?></td>
		<td><?php echo $banktransfer->fields['banktransfer_bankname']; ?></td>
	  </tr>
	  <tr>
		<td><?php echo TEXT_BANK_BLZ; ?></td>
		<td><?php echo $banktransfer->fields['banktransfer_blz']; ?></td>
	  </tr>
	  <tr>
		<td><?php echo TEXT_BANK_NUMBER; ?></td>
		<td><?php echo $banktransfer->fields['banktransfer_number']; ?></td>
	  </tr>
	  <tr>
		<td><?php echo TEXT_BANK_OWNER; ?></td>
		<td><?php echo $banktransfer->fields['banktransfer_owner']; ?></td>
	  </tr>
	<?php

	if ($banktransfer->fields['banktransfer_status'] == 0) {
	?>
	  <tr>
		<td><?php echo TEXT_BANK_STATUS; ?></td>
		<td><?php echo "OK"; ?></td>
	  </tr>
	<?php

	} else {
	?>
	  <tr>
		<td><?php echo TEXT_BANK_STATUS; ?></td>
		<td><?php echo $banktransfer->fields['banktransfer_status']; ?></td>
	  </tr>
	<?php

		switch ($banktransfer->fields['banktransfer_status']) {
			case 1 :
				$error_val = TEXT_BANK_ERROR_1;
				break;
			case 2 :
				$error_val = TEXT_BANK_ERROR_2;
				break;
			case 3 :
				$error_val = TEXT_BANK_ERROR_3;
				break;
			case 4 :
				$error_val = TEXT_BANK_ERROR_4;
				break;
			case 5 :
				$error_val = TEXT_BANK_ERROR_5;
				break;
			case 8 :
				$error_val = TEXT_BANK_ERROR_8;
				break;
			case 9 :
				$error_val = TEXT_BANK_ERROR_9;
				break;
		}
	?>
	  <tr>
		<td><?php echo TEXT_BANK_ERRORCODE; ?></td>
		<td><?php echo $error_val; ?></td>
	  </tr>
	  <tr>
		<td><?php echo TEXT_BANK_PRZ; ?></td>
		<td><?php echo $banktransfer->fields['banktransfer_prz']; ?></td>
	  </tr>
	<?php

			}
		}
		if ($banktransfer->fields['banktransfer_fax']) {
	?>
			  <tr>
				<td><?php echo TEXT_BANK_FAX; ?></td>
				<td><?php echo $banktransfer->fields['banktransfer_fax']; ?></td>
			  </tr>
	<?php }	?>